﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wpf_ClientLourd.ServiceBP;

namespace Wpf_ClientLourd.BusinessObject
{
    public class BP
    {
        public int id { get; set; }
        public int numAff { get; set; }
        public DateTime date { get; set; }
        public string statut { get; set; }
        public int id_cmd { get; set; }
        public string type { get; set; }

        public BP(BPDTO bp)
        {
            this.id = bp.idBP;
            this.date = bp.dateBP;
            switch (bp.statutBP)
            {
                case 0: this.statut = "Généré";
                    break;

                case 1: this.statut = "Reliquat";
                    break;

                case 2: this.statut = "En cours";
                    break;

                case 3: this.statut = "Fini";
                    break;
            }
            this.id_cmd = bp.idCmd;
            if (bp.typeBP == 1)
                this.type = "Picking";
            else
                this.type = "Palette";
                
        }
    }
}
